{extends file='layout/main.html'}
{block name="main"}
<div class="main_title">
	<h2>添加分类</h2>
	<p>分类的添加</p>
</div>
{if $info.id}
<form action="?url=category/update&id={$info.id}" method="post" accept-charset="utf-8">
{else}
<form action="?url=category/create" method="post" accept-charset="utf-8">
{/if}
<div class="con_blk">
  <h3 class="light_gray">分类名称</h3>
  <input name="info[name]" type="text" value="{$info.name}" class="text"/>
</div>

<div class="con_blk">
  <h3 class="light_gray">排序:</h3>
  <input name="info[view_order]" type="text" value="{$info.view_order|default:0}" class="text"/>
</div>

<div class="clearfix">
	<dl class="set_blk">
		<dt class="light_gray">所属上级</dt>
		<dd>
		  <select name="info[parent_id]">
		    <option value="0">无</option>
		    {foreach $parent as $val}
		    <option value="{$val.id}"{if $info.parent_id == $val.id} selected{/if}>{$val.name}</option>
		    {/foreach}
		  </select>
		</dd>
	</dl>
</div>



</form>

<div class="btn_blk b_t">
	<div class="fr">
		<a href="#" class="btn2 fr ml20 cancel">取消</a>
		<a href="#" class="btn1 fr save">确定</a>
	</div>
</div>

{/block}